import { Component, OnInit, OnDestroy } from '@angular/core';
import { Farm } from '../../../entity/farm.model';
import { DeviceCategoryEnum } from '../../common/device-tag-selector/device-category.enum';
import { FarmCategoryEnum } from '../../common/device-tag-selector/farm-category.enum';
import { Device } from '../../../entity/device.model';
import { Tag } from '../../../entity/tag.model';
import { timeout } from 'q';


@Component({
  selector: 'app-convergencebox-list',
  templateUrl: './convergencebox-list.component.html',
  styleUrls: ['./convergencebox-list.component.css']
})
export class ConvergenceboxListComponent implements OnInit {
  public farmId = 0;
  public farmCategory = FarmCategoryEnum.photovoltaic;
  public deviceCategories = [DeviceCategoryEnum.inverter];
  public currentFarm: Farm = null;
  public inverters: Device[] = [];
  public selectedDeviceId = 1;
  constructor() {
  }
  ngOnInit() {
  }
  onChangeFarm(farm: Farm) {
    setTimeout(() => {
      this.currentFarm = farm;
    });
  }
  onSelectedDevicesChange(devices: Device[]) {
    setTimeout(() => {
      this.inverters = devices;
    });
  }
}






// WEBPACK FOOTER //
// ./src/app/module/monitor/convergencebox-list/convergencebox-list.component.ts